/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package estatisticadescritiva;

import java.util.ArrayList;

/**
 *
 * @author Bush
 */
public abstract class AbstractEstatistica {
    
    public final double getSomaDosElementosAoQuadrado(ArrayList<Double> numeros) {
        double total = 0;
        for (int counter = 0; counter < numeros.size(); counter++) {
            total += Math.pow(numeros.get(counter), 2);
        }
        return total;
    }

    public final double getSomaDosElementos(ArrayList<Double> numeros) {
        double total = 0;
        for (int counter = 0; counter < numeros.size(); counter++) {
            total += numeros.get(counter);
        }
        return total;
    }
    
    public abstract double calcula(ArrayList<Double> numeros);
    
}
